package org.wang.web.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class MyInterceptor implements Interceptor {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7792003896294601800L;

	@Override
	public void destroy() {
		System.out.println("MyInterceptor destroy"); 

	}

	@Override
	public void init() {
		System.out.println("MyInterceptor init"); 

	}

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		System.out.println("Action执行前插入 代码");  
		final String res = invocation.invoke();
		System.out.println("Action执行后插入 代码");  
		return res;
	}

}
